package com.research.project.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.research.common.annotation.Excel;
import com.research.common.core.domain.BaseEntity;

/**
 * 项目文档对象 tb_project_doc
 * 
 * @author ghn
 * @date 2025-09-07
 */
public class ProjectDoc extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 项目ID */
    private Long projectId;

    /** 文件名称 */
    @Excel(name = "文件名称")
    private String fileName;

    /** 文件类型（docx/pdf/xlsx...） */
    @Excel(name = "文件类型", readConverterExp = "d=ocx/pdf/xlsx...")
    private String fileType;

    /** 阿里云OSS返回的文件访问URL */
    private String fileUrl;

    /** 上传人ID（关联用户表的主键ID） */
    private Long uploaderId;

    /** 上传人姓名（冗余字段，方便展示） */
    @Excel(name = "上传人姓名", readConverterExp = "冗=余字段，方便展示")
    private String uploaderName;

    /** 上传时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "上传时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date uploadTime;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setProjectId(Long projectId) 
    {
        this.projectId = projectId;
    }

    public Long getProjectId() 
    {
        return projectId;
    }

    public void setFileName(String fileName) 
    {
        this.fileName = fileName;
    }

    public String getFileName() 
    {
        return fileName;
    }

    public void setFileType(String fileType) 
    {
        this.fileType = fileType;
    }

    public String getFileType() 
    {
        return fileType;
    }

    public void setFileUrl(String fileUrl) 
    {
        this.fileUrl = fileUrl;
    }

    public String getFileUrl() 
    {
        return fileUrl;
    }

    public void setUploaderId(Long uploaderId) 
    {
        this.uploaderId = uploaderId;
    }

    public Long getUploaderId() 
    {
        return uploaderId;
    }

    public void setUploaderName(String uploaderName) 
    {
        this.uploaderName = uploaderName;
    }

    public String getUploaderName() 
    {
        return uploaderName;
    }

    public void setUploadTime(Date uploadTime) 
    {
        this.uploadTime = uploadTime;
    }

    public Date getUploadTime() 
    {
        return uploadTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("projectId", getProjectId())
            .append("fileName", getFileName())
            .append("fileType", getFileType())
            .append("fileUrl", getFileUrl())
            .append("uploaderId", getUploaderId())
            .append("uploaderName", getUploaderName())
            .append("uploadTime", getUploadTime())
            .append("remark", getRemark())
            .toString();
    }
}
